/*
 * -------------------------------------------------------------------------------------------------------*
 * SBS Priceboard V2.0
 * Copyright (C) 2008 Unicom Vietnam JSC
 * -------------------------------------------------------------------------------------------------------* 
 * HeadURL: http://192.168.1.4/svn/priceboard/trunk/SBS_PriceboardV2/front-end/end-user/i_priceboard/
 * LastChangeBy: quanhm
 * LastChangeDate: Sep 5, 2008
 */
package com.unicom.priceboard.data.vo;

/**
 * Creation date: Sep 5, 2008
 * @author quan
 */
public class MarketTrack {
	private String indexDate;
	private int centerId;
	private int session;
	private int totalTrade;
	private double index;
	private double changeIndex;
	private double pctIndex;
	private int totalVol;
	private int totalVal;
	private int ptTotalVol;
	private int ptTotalVal;
	
	public MarketTrack(HaIndex haIndex) {
		String[] originalDate = haIndex.getIndexDate().split("/");
		this.indexDate = originalDate[2]+"-"+originalDate[1]+"-"+originalDate[0];
		this.centerId = 2;
		this.session = Integer.parseInt(haIndex.getSession());
		this.totalTrade = Integer.parseInt(haIndex.getTotalTrade().replaceAll(",", ""));
		this.index = haIndex.getIndex();
		this.changeIndex = haIndex.getChangeIndex();
		this.pctIndex = haIndex.getPctIndex();
		this.totalVol = Integer.parseInt(haIndex.getTotalVol().replaceAll(",", ""));
		this.totalVal = new Long(haIndex.getTotalVal()).intValue();
		this.ptTotalVol = new Long(haIndex.getPtTotalVol()).intValue();
		this.ptTotalVal = new Long(haIndex.getPtTotalVal()).intValue();
	}
	
	/**
	 * @return the indexDate
	 */
	public String getIndexDate() {
		return indexDate;
	}
	/**
	 * @return the centerId
	 */
	public int getCenterId() {
		return centerId;
	}
	/**
	 * @return the session
	 */
	public int getSession() {
		return session;
	}
	/**
	 * @return the totalTrade
	 */
	public int getTotalTrade() {
		return totalTrade;
	}
	/**
	 * @return the index
	 */
	public double getIndex() {
		return index;
	}
	/**
	 * @return the changeIndex
	 */
	public double getChangeIndex() {
		return changeIndex;
	}
	/**
	 * @return the pctIndex
	 */
	public double getPctIndex() {
		return pctIndex;
	}
	/**
	 * @return the totalVol
	 */
	public int getTotalVol() {
		return totalVol;
	}
	/**
	 * @return the totalVal
	 */
	public int getTotalVal() {
		return totalVal;
	}
	/**
	 * @return the ptTotalVol
	 */
	public int getPtTotalVol() {
		return ptTotalVol;
	}
	/**
	 * @return the ptTotalVal
	 */
	public int getPtTotalVal() {
		return ptTotalVal;
	}
	/**
	 * @param indexDate the indexDate to set
	 */
	public void setIndexDate(String indexDate) {
		this.indexDate = indexDate;
	}
	/**
	 * @param centerId the centerId to set
	 */
	public void setCenterId(int centerId) {
		this.centerId = centerId;
	}
	/**
	 * @param session the session to set
	 */
	public void setSession(int session) {
		this.session = session;
	}
	/**
	 * @param totalTrade the totalTrade to set
	 */
	public void setTotalTrade(int totalTrade) {
		this.totalTrade = totalTrade;
	}
	/**
	 * @param index the index to set
	 */
	public void setIndex(double index) {
		this.index = index;
	}
	/**
	 * @param changeIndex the changeIndex to set
	 */
	public void setChangeIndex(double changeIndex) {
		this.changeIndex = changeIndex;
	}
	/**
	 * @param pctIndex the pctIndex to set
	 */
	public void setPctIndex(double pctIndex) {
		this.pctIndex = pctIndex;
	}
	/**
	 * @param totalVol the totalVol to set
	 */
	public void setTotalVol(int totalVol) {
		this.totalVol = totalVol;
	}
	/**
	 * @param totalVal the totalVal to set
	 */
	public void setTotalVal(int totalVal) {
		this.totalVal = totalVal;
	}
	/**
	 * @param ptTotalVol the ptTotalVol to set
	 */
	public void setPtTotalVol(int ptTotalVol) {
		this.ptTotalVol = ptTotalVol;
	}
	/**
	 * @param ptTotalVal the ptTotalVal to set
	 */
	public void setPtTotalVal(int ptTotalVal) {
		this.ptTotalVal = ptTotalVal;
	}
}
